package com.coursedesign.service;

import com.coursedesign.bean.User;
import com.coursedesign.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements  UserService{

    @Autowired
    UserMapper userMapper;

    @Override
    public List<User> getUserList() {
        List<User> userList = userMapper.getUserList();

        return userList;
    }

    @Override
    public List<User> getUserListXML() {
        List<User> userList = userMapper.getUserList2();
        return userList;
    }

    @Override
    public User userLogin(User userLogin) {
        User user = userMapper.userLogin(userLogin);
        return user;
    }

    @Override
    public int userRegister(User registerUser) {
        return userMapper.userRegister(registerUser);
    }
}
